package com.ruralflow.flow.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruralflow.common.annotation.Excel;
import com.ruralflow.common.core.domain.BaseEntity;

/**
 * 流动申请对象 tb_flow_apply
 *
 * @author ruralflow
 * @date 2025-02-17
 */
public class FlowApply extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long applyId;

    /** 流动申请信息编号 */
    @Excel(name = "流动申请信息编号")
    private String applyCode;

    /** 流动人口ID（关联tb_population表） */
    @Excel(name = "流动人口ID", readConverterExp = "关=联tb_population表")
    private Long populationId;

    /** 流动起始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "流动起始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyStartTime;

    /** 流动结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "流动结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyEndTime;

    /** 申请原因 */
    @Excel(name = "申请原因")
    private String applyReason;

    /** 申请状态：0待审核，1已通过，2已拒绝 */
    @Excel(name = "申请状态：0待审核，1已通过，2已拒绝")
    private String applyStatus;

    /** 当前审批人 */
    @Excel(name = "当前审批人")
    private String approveBy;

    /** 流程实例id */
    @Excel(name = "流程实例id")
    private String processInstanceId;

    /** 流程定义key */
    private String processDefinitionKey;

    /** 删除标记：0正常，1已删除 */
    private String delFlag;

    public void setApplyId(Long applyId)
    {
        this.applyId = applyId;
    }

    public Long getApplyId()
    {
        return applyId;
    }
    public void setApplyCode(String applyCode)
    {
        this.applyCode = applyCode;
    }

    public String getApplyCode()
    {
        return applyCode;
    }
    public void setPopulationId(Long populationId)
    {
        this.populationId = populationId;
    }

    public Long getPopulationId()
    {
        return populationId;
    }
    public void setApplyStartTime(Date applyStartTime)
    {
        this.applyStartTime = applyStartTime;
    }

    public Date getApplyStartTime()
    {
        return applyStartTime;
    }
    public void setApplyEndTime(Date applyEndTime)
    {
        this.applyEndTime = applyEndTime;
    }

    public Date getApplyEndTime()
    {
        return applyEndTime;
    }
    public void setApplyReason(String applyReason)
    {
        this.applyReason = applyReason;
    }

    public String getApplyReason()
    {
        return applyReason;
    }
    public void setApplyStatus(String applyStatus)
    {
        this.applyStatus = applyStatus;
    }

    public String getApplyStatus()
    {
        return applyStatus;
    }
    public void setApproveBy(String approveBy)
    {
        this.approveBy = approveBy;
    }

    public String getApproveBy()
    {
        return approveBy;
    }
    public void setProcessInstanceId(String processInstanceId)
    {
        this.processInstanceId = processInstanceId;
    }

    public String getProcessInstanceId()
    {
        return processInstanceId;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("applyId", getApplyId())
                .append("applyCode", getApplyCode())
                .append("populationId", getPopulationId())
                .append("applyStartTime", getApplyStartTime())
                .append("applyEndTime", getApplyEndTime())
                .append("applyReason", getApplyReason())
                .append("applyStatus", getApplyStatus())
                .append("approveBy", getApproveBy())
                .append("processInstanceId", getProcessInstanceId())
                .append("processDefinitionKey", getProcessDefinitionKey())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .append("delFlag", getDelFlag())
                .toString();
    }

    public String getProcessDefinitionKey() {
        return processDefinitionKey;
    }

    public void setProcessDefinitionKey(String processDefinitionKey) {
        this.processDefinitionKey = processDefinitionKey;
    }
}
